<script setup lang="ts">
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
import { navigateTo } from "./public";
onLaunch(  () => {
  // console.log("App Launch");
  // 本地是否存在 token
  // const res= await 
  const userId=uni.getStorageSync('token');
  if(!userId) return navigateTo('/subPackages/loginPage/login');

});
onShow(() => {
  console.log("App Show");
});
onHide(() => {
  console.log("App Hide");
});
</script>
<style lang="scss">
/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
@import "uview-plus/index.scss";
@import './style/iconfont-weapp-icon.css';

view,
text,
div {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

page {
  background-color: #f5f5f5;
}
</style>
